package com.ruoyi.demo.controller;

import com.ruoyi.demo.util.ResultUtil;
import com.ruoyi.demo.service.IMeetDetailService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/demo/meetDetail")
public class MeetDetailController {
    @Resource
    IMeetDetailService meetDetailService;
    @GetMapping("/{meetId}")
    ResultUtil getMeetDetail(@PathVariable int meetId){
       return new ResultUtil(true,meetDetailService.getMeetDetailById(meetId));
    }
    @PutMapping
    ResultUtil getIsMeetReserve(@RequestParam("roomId") int roomId,
                                @RequestParam("reserveEndTime") String reserveEndTime,
                                @RequestParam("reserveStartTime") String reserveStartTime) {
        return new ResultUtil(meetDetailService.getIsMeetReserve(roomId,reserveEndTime,reserveStartTime));
    }
}
